/**
 * 系统配置文件
 * User: Vector Ho
 * Date: 2014-06-05
 * Time: 下午2:29
 * To change this template use File | Settings | File Templates.
 *      系统配置文件
 */

var currentDir = __dirname.replace(/\\/g, '/');
var lastIndex = currentDir.lastIndexOf('/');

/**
 * 网站根目录
 * @type {string}
 */
exports.ROOT_PATH = currentDir.slice(0, lastIndex);

/**
 * mysql库配置
 * @type {{host: string, user: string, password: string, database: string, charset: string}}
 */
exports.dbConfig = {
    'host':'127.0.0.1',
    'user':'root',
    'password':'root',
    'database':'instant',
    'charset':'utf8'
};

/**
 * redis库配置
 * @type {{port: string, host: string, options: {connect_timeout: string}}}
 */
exports.redisConfig = {
    'port':'6379',
    'host':'127.0.0.1',
    'options':{
        'connect_timeout':'5000'
    }
};

/**
 * mongodb库配置：原生驱动
 * @type {{host: string, port: string, options: {auto_reconnect: boolean, poolSize: number}, database: string}}
 */
exports.mongodbConfig = {
    'host':'yezhiming.com',
    'port':'27017',
    'options':{
        'auto_reconnect': true,
        'poolSize':10
    },
    'database':'zillaInstant'
};

// mongodb://user:pass@localhost:port/database
exports.mongooseConfig = "mongodb://localhost/zillaInstant";

/**
 * MODEL文件夹路径
 * @type {string}
 */
exports.MODEL_PATH =  this.ROOT_PATH + '/model/';

/**
 * lib文件夹路径
 * @type {string}
 */
exports.LIB_PATH = this.ROOT_PATH + '/helper/';

exports.APP_ID = "ec691bfe0d4b5b759d154c453ccd02cb";
exports.APP_SECRET = "a07fc12f-2ca2-48bc-8276-f64fc13317bf";

/**
 * log文件夹路径：pm2替代
 * @type {string}
 */
// exports.LOG_PATH = this.ROOT_PATH + '/log/';


